//
//  UIImage+BVImage.m
//  BuyVegetable
//
//  Created by yushanchang on 16/9/28.
//  Copyright © 2016年 com.yinding. All rights reserved.
//

#import "UIImage+BVImage.m"

@implementation UIImage (BVImage)

#pragma mark - 禁止渲染
+ (instancetype)imageWithOriginalName:(NSString *)imageName{
    
    UIImage *image = [UIImage imageNamed:imageName];
    // 保持图片原始状态
    return [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
}

+ (instancetype)imageWithStretchableName:(NSString *)imageName{
    
    UIImage *image = [UIImage imageNamed:imageName];
    return [image stretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
}

@end
